package cola0502.project.hellospringbootcola0502.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {

/*    @Resource
    ColaService colaService;*/

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
                .authorizeRequests()
                .antMatchers("/v1/api/**").permitAll()
                .and()
                .csrf().disable()
                .formLogin();
    }

/*    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth
                .userDetailsService(colaService)
                .passwordEncoder(new BCryptPasswordEncoder())
                ;
    }*/

}
